<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tlds/mongoosehome-common.tld" prefix="mgh" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>JSP Page</title>
    </head>
    <body>
    <form id="pagerForm" method="post" action="productList.htm">
        <input type="hidden" name="status" value="${param.status}" />
        <input type="hidden" name="keywords" value="${param.keywords}" />
        <input type="hidden" name="pageNum" value="1" />
        <input type="hidden" name="numPerPage" value="${productPageInfo.pageSize}" />
        <input type="hidden" name="orderField" value="${param.orderField}" />
    </form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="demo_page1.html" method="post">
	<div class="searchBar">
		<!--<ul class="searchContent">
			<li>
				<label>我的客户：</label>
				<input type="text"/>
			</li>
			<li>
			<select class="combox" name="province">
				<option value="">所有省市</option>
				<option value="北京">北京</option>
				<option value="上海">上海</option>
				<option value="天津">天津</option>
				<option value="重庆">重庆</option>
				<option value="广东">广东</option>
			</select>
			</li>
		</ul>
		-->
		<table class="searchContent">
			<tr>
				<td>
					我的客户：<input type="text" name="keyword" />
				</td>
				<td>
					<select class="combox" name="province">
						<option value="">所有省市</option>
						<option value="北京">北京</option>
						<option value="上海">上海</option>
						<option value="天津">天津</option>
						<option value="重庆">重庆</option>
						<option value="广东">广东</option>
					</select>
				</td>
				<td>
					建档日期：<input type="text" class="date" readonly="true" />
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="productList!add.htm" onclick="createHref(this)" target="navTab" title="添加商品"><span>添加</span></a></li>
			<li><a class="delete" href="demo/common/ajaxDone.html?uid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="productList!update.htm?pid={sid_user}" onclick="createHref(this)" target="dialog"><span>修改商品信息</span></a></li>
            <li><a class="edit" href="productList!updateImages.htm?pid={sid_user}" onclick="createHref(this)"  target="navTab"><span>修改商品图片</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
   				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>         
				<th width="100">ID</th>
				<th width="120">商品名称</th>
				<th width="100">商品价格</th>
				<th width="100">商品图片</th>
				<th width="150">轮转图片</th>				
				<th width="80">类别</th>
				<th width="100">建档日期</th>
			</tr>
		</thead>
		<tbody>
            <c:forEach items="${productPageInfo.fileList}" var="p">
			<tr target="sid_user" rel="${p.productId}">
                <td><input name="ids" value="${p.productId}" type="checkbox"></td>
				<td>${p.productId}</td>
				<td>${p.productName}</td>
				<td><fmt:formatNumber value="${p.price/100}" pattern="#,##0.00" /></td>
                <td>${p.photo}</td>
				<td>${p.photoTurn}</td>				
				<td>${p.category}</td>
                <td><fmt:formatDate value="${p.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			</tr>
            </c:forEach>	                    
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                            <option <c:if test="${productPageInfo.pageSize==5}">selected</c:if> value="5">5</option>
                            <option <c:if test="${productPageInfo.pageSize==10}">selected</c:if> value="10">10</option>
                            <option <c:if test="${productPageInfo.pageSize==20}">selected</c:if> value="20">20</option>
                            <option <c:if test="${productPageInfo.pageSize==50}">selected</c:if> value="50">50</option>
                            <option <c:if test="${productPageInfo.pageSize==100}">selected</c:if>  value="100">100</option>
                            <option <c:if test="${productPageInfo.pageSize==200}">selected</c:if>  value="200">200</option>
			</select>
			<span>条，共${productPageInfo.totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${productPageInfo.totalCount}" numPerPage="${productPageInfo.pageSize}" pageNumShown="10" currentPage="${productPageInfo.currentPage}"></div>

	</div>
</div>

    </body>
</html>
